<extend name="Public/header" />
<block name="main">
    <div class="col-lg-10">
        <div class="panel panel-default">
            <div class="panel-heading">
                Basic Form Elements
            </div>
            <div class="panel-body">
                <div class="row">
                    <div class="col-lg-8">
                        <form role="form" action="{:U('add')}" method="post" enctype="multipart/form-data">
                            <div class="form-group">
                                 <label>商品名称</label>
                                 <br>
                                <select name="gid" class="form-control">
                                    <option value="">请选择</option>
                                    <foreach name="list" item="val">
                                        <option value="{$val.id}">{$val.name}</option>
                                    </foreach>
                                </select>
                            </div>

                               <div class="form-group">
                                 <label>商家名称</label>
                                 <br>
                                <select name="bid" class="form-control">
                                    <option value="">请选择</option>
                                    <foreach name="list1" item="val">
                                        <option value="{$val.id}">{$val.name}</option>
                                    </foreach>
                                </select>
                            </div>
                            <div class="form-group">  
                                    <label>开始时间：</label>  
                                    <!--指定 date标记-->  
                                    <div class='input-group date' >
                                        <input type='text' id='dates'  class="form-control" name="start" placeholder="开始轮播时间"/>
                                        <span class="input-group-addon">  
                                            <span class="glyphicon glyphicon-calendar"></span>  
                                        </span>  
                                    </div>  
                                </div>
                            <script>
                                $("#dates").datetimepicker();
                            </script>
                            <script>
                                $("#dates").datetimepicker({
                                    format: "yyyy-mm-dd",
                                    autoclose: true,
                                    todayBtn: true,
                                    todayHighlight: true,
                                    showMeridian: true,
                                    pickerPosition: "bottom-left",
                                    language: 'zh-CN',//中文，需要引用zh-CN.js包
                                    startView: 2,//月视图
                                    minView: 2//日期时间选择器所能够提供的最精确的时间选择视图
                                });
                            </script>

                              <div class="form-group">
                                    <label>结束时间：</label>  
                                    <!--指定 date标记-->
                                  <div class='input-group date'  >
                                      <input type='text'  id='date' class="form-control" name="stop" placeholder="结束轮播时间" />
                                      <span class="input-group-addon">
                                            <span class="glyphicon glyphicon-calendar"></span>
                                        </span>
                                  </div>
                                </div>
                            <script>
                                $("#date").datetimepicker();
                            </script>
                            <script>
                                $("#date").datetimepicker({
                                    format: "yyyy-mm-dd",
                                    autoclose: true,
                                    todayBtn: true,
                                    todayHighlight: true,
                                    showMeridian: true,
                                    pickerPosition: "bottom-left",
                                    language: 'zh-CN',//中文，需要引用zh-CN.js包
                                    startView: 2,//月视图
                                    minView: 2//日期时间选择器所能够提供的最精确的时间选择视图
                                });
                            </script>
                            <div class="form-group">
                                <label>轮播图片</label>
                                <input type="file"  name="img">
                            </div>
                            <div class="form-group">
                                <label>排名</label>
                                <input class="form-control" name="ranking" placeholder="排名">
                            </div>
                            <div class="form-group">
                                <label>点击数量</label>
                                <input class="form-control" name="cnum" placeholder="点击数量">
                            </div>
                            <div class="form-group">
                                <label>是否启用</label>
                                <select name="state" class="form-control">
                                    <option value="1">启用</option>
                                    <option value="2">隐藏</option>
                                </select>
                            </div>
                            <button type="submit" class="btn btn-default">Submit Button</button>
                            <button type="reset" class="btn btn-default">Reset Button</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

</block>